package com.ecoolex.discount.sales.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.lang.NonNull;

public class UPlanCouponBatchExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer offset;

    protected Integer rows;

    public UPlanCouponBatchExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public UPlanCouponBatchExample orderBy(String orderByClause) {
        this.setOrderByClause(orderByClause);
        return this;
    }

    public UPlanCouponBatchExample orderBy(String ... orderByClauses) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < orderByClauses.length; i++) {
            sb.append(orderByClauses[i]);
            if (i < orderByClauses.length - 1) {
                sb.append(" , ");
            }
        }
        this.setOrderByClause(sb.toString());
        return this;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria(this);
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
        rows = null;
        offset = null;
    }

    public static Criteria newAndCreateCriteria() {
        UPlanCouponBatchExample example = new UPlanCouponBatchExample();
        return example.createCriteria();
    }

    public UPlanCouponBatchExample when(boolean condition, IExampleWhen then) {
        if (condition) {
            then.example(this);
        }
        return this;
    }

    public UPlanCouponBatchExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
        if (condition) {
            then.example(this);
        } else {
            otherwise.example(this);
        }
        return this;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return this.offset;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Integer getRows() {
        return this.rows;
    }

    public UPlanCouponBatchExample limit(Integer rows) {
        this.rows = rows;
        return this;
    }

    public UPlanCouponBatchExample limit(Integer offset, Integer rows) {
        this.offset = offset;
        this.rows = rows;
        return this;
    }

    public UPlanCouponBatchExample page(Integer page, Integer pageSize) {
        this.offset = page * pageSize;
        this.rows = pageSize;
        return this;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("uplancouponbatch.Id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("uplancouponbatch.Id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("uplancouponbatch.Id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Id = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("uplancouponbatch.Id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Id <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("uplancouponbatch.Id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Id > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("uplancouponbatch.Id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Id >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("uplancouponbatch.Id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Id < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("uplancouponbatch.Id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Id <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("uplancouponbatch.Id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("uplancouponbatch.Id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("uplancouponbatch.Id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("uplancouponbatch.Id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andBatchCodeIsNull() {
            addCriterion("uplancouponbatch.BatchCode is null");
            return (Criteria) this;
        }

        public Criteria andBatchCodeIsNotNull() {
            addCriterion("uplancouponbatch.BatchCode is not null");
            return (Criteria) this;
        }

        public Criteria andBatchCodeEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchCode =", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchCode = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchCodeNotEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchCode <>", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchCode <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchCodeGreaterThan(String value) {
            addCriterion("uplancouponbatch.BatchCode >", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchCode > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchCodeGreaterThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchCode >=", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchCode >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchCodeLessThan(String value) {
            addCriterion("uplancouponbatch.BatchCode <", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchCode < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchCodeLessThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchCode <=", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchCode <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchCodeLike(String value) {
            addCriterion("uplancouponbatch.BatchCode like", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeNotLike(String value) {
            addCriterion("uplancouponbatch.BatchCode not like", value, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeIn(List<String> values) {
            addCriterion("uplancouponbatch.BatchCode in", values, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeNotIn(List<String> values) {
            addCriterion("uplancouponbatch.BatchCode not in", values, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.BatchCode between", value1, value2, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchCodeNotBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.BatchCode not between", value1, value2, "batchCode");
            return (Criteria) this;
        }

        public Criteria andBatchNameIsNull() {
            addCriterion("uplancouponbatch.BatchName is null");
            return (Criteria) this;
        }

        public Criteria andBatchNameIsNotNull() {
            addCriterion("uplancouponbatch.BatchName is not null");
            return (Criteria) this;
        }

        public Criteria andBatchNameEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchName =", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchName = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchNameNotEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchName <>", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchName <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchNameGreaterThan(String value) {
            addCriterion("uplancouponbatch.BatchName >", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchName > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchNameGreaterThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchName >=", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchName >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchNameLessThan(String value) {
            addCriterion("uplancouponbatch.BatchName <", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchName < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchNameLessThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.BatchName <=", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.BatchName <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchNameLike(String value) {
            addCriterion("uplancouponbatch.BatchName like", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameNotLike(String value) {
            addCriterion("uplancouponbatch.BatchName not like", value, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameIn(List<String> values) {
            addCriterion("uplancouponbatch.BatchName in", values, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameNotIn(List<String> values) {
            addCriterion("uplancouponbatch.BatchName not in", values, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.BatchName between", value1, value2, "batchName");
            return (Criteria) this;
        }

        public Criteria andBatchNameNotBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.BatchName not between", value1, value2, "batchName");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeIsNull() {
            addCriterion("uplancouponbatch.PromotionCode is null");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeIsNotNull() {
            addCriterion("uplancouponbatch.PromotionCode is not null");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeEqualTo(String value) {
            addCriterion("uplancouponbatch.PromotionCode =", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.PromotionCode = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotEqualTo(String value) {
            addCriterion("uplancouponbatch.PromotionCode <>", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.PromotionCode <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThan(String value) {
            addCriterion("uplancouponbatch.PromotionCode >", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.PromotionCode > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.PromotionCode >=", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.PromotionCode >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThan(String value) {
            addCriterion("uplancouponbatch.PromotionCode <", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.PromotionCode < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.PromotionCode <=", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.PromotionCode <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLike(String value) {
            addCriterion("uplancouponbatch.PromotionCode like", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotLike(String value) {
            addCriterion("uplancouponbatch.PromotionCode not like", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeIn(List<String> values) {
            addCriterion("uplancouponbatch.PromotionCode in", values, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotIn(List<String> values) {
            addCriterion("uplancouponbatch.PromotionCode not in", values, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.PromotionCode between", value1, value2, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.PromotionCode not between", value1, value2, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andNotesIsNull() {
            addCriterion("uplancouponbatch.Notes is null");
            return (Criteria) this;
        }

        public Criteria andNotesIsNotNull() {
            addCriterion("uplancouponbatch.Notes is not null");
            return (Criteria) this;
        }

        public Criteria andNotesEqualTo(String value) {
            addCriterion("uplancouponbatch.Notes =", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Notes = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNotesNotEqualTo(String value) {
            addCriterion("uplancouponbatch.Notes <>", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Notes <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNotesGreaterThan(String value) {
            addCriterion("uplancouponbatch.Notes >", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Notes > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNotesGreaterThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.Notes >=", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Notes >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNotesLessThan(String value) {
            addCriterion("uplancouponbatch.Notes <", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Notes < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNotesLessThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.Notes <=", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Notes <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNotesLike(String value) {
            addCriterion("uplancouponbatch.Notes like", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesNotLike(String value) {
            addCriterion("uplancouponbatch.Notes not like", value, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesIn(List<String> values) {
            addCriterion("uplancouponbatch.Notes in", values, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesNotIn(List<String> values) {
            addCriterion("uplancouponbatch.Notes not in", values, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.Notes between", value1, value2, "notes");
            return (Criteria) this;
        }

        public Criteria andNotesNotBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.Notes not between", value1, value2, "notes");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("uplancouponbatch.`Status` is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("uplancouponbatch.`Status` is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Long value) {
            addCriterion("uplancouponbatch.`Status` =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`Status` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Long value) {
            addCriterion("uplancouponbatch.`Status` <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`Status` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Long value) {
            addCriterion("uplancouponbatch.`Status` >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`Status` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Long value) {
            addCriterion("uplancouponbatch.`Status` >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`Status` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Long value) {
            addCriterion("uplancouponbatch.`Status` <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`Status` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Long value) {
            addCriterion("uplancouponbatch.`Status` <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`Status` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Long> values) {
            addCriterion("uplancouponbatch.`Status` in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Long> values) {
            addCriterion("uplancouponbatch.`Status` not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Long value1, Long value2) {
            addCriterion("uplancouponbatch.`Status` between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Long value1, Long value2) {
            addCriterion("uplancouponbatch.`Status` not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNull() {
            addCriterion("uplancouponbatch.Deleted is null");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNotNull() {
            addCriterion("uplancouponbatch.Deleted is not null");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualTo(Boolean value) {
            addCriterion("uplancouponbatch.Deleted =", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Deleted = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualTo(Boolean value) {
            addCriterion("uplancouponbatch.Deleted <>", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Deleted <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThan(Boolean value) {
            addCriterion("uplancouponbatch.Deleted >", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Deleted > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
            addCriterion("uplancouponbatch.Deleted >=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Deleted >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThan(Boolean value) {
            addCriterion("uplancouponbatch.Deleted <", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Deleted < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
            addCriterion("uplancouponbatch.Deleted <=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.Deleted <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedIn(List<Boolean> values) {
            addCriterion("uplancouponbatch.Deleted in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotIn(List<Boolean> values) {
            addCriterion("uplancouponbatch.Deleted not in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
            addCriterion("uplancouponbatch.Deleted between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
            addCriterion("uplancouponbatch.Deleted not between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNull() {
            addCriterion("uplancouponbatch.`CreateUser` is null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNotNull() {
            addCriterion("uplancouponbatch.`CreateUser` is not null");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualTo(String value) {
            addCriterion("uplancouponbatch.`CreateUser` =", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`CreateUser` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualTo(String value) {
            addCriterion("uplancouponbatch.`CreateUser` <>", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`CreateUser` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThan(String value) {
            addCriterion("uplancouponbatch.`CreateUser` >", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`CreateUser` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.`CreateUser` >=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`CreateUser` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThan(String value) {
            addCriterion("uplancouponbatch.`CreateUser` <", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`CreateUser` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.`CreateUser` <=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.`CreateUser` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLike(String value) {
            addCriterion("uplancouponbatch.`CreateUser` like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotLike(String value) {
            addCriterion("uplancouponbatch.`CreateUser` not like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserIn(List<String> values) {
            addCriterion("uplancouponbatch.`CreateUser` in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotIn(List<String> values) {
            addCriterion("uplancouponbatch.`CreateUser` not in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.`CreateUser` between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.`CreateUser` not between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("uplancouponbatch.CreateTime is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("uplancouponbatch.CreateTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("uplancouponbatch.CreateTime =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.CreateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("uplancouponbatch.CreateTime <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.CreateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("uplancouponbatch.CreateTime >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.CreateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("uplancouponbatch.CreateTime >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.CreateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("uplancouponbatch.CreateTime <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.CreateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("uplancouponbatch.CreateTime <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.CreateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("uplancouponbatch.CreateTime in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("uplancouponbatch.CreateTime not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("uplancouponbatch.CreateTime between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("uplancouponbatch.CreateTime not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNull() {
            addCriterion("uplancouponbatch.UpdateUser is null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNotNull() {
            addCriterion("uplancouponbatch.UpdateUser is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualTo(String value) {
            addCriterion("uplancouponbatch.UpdateUser =", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateUser = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualTo(String value) {
            addCriterion("uplancouponbatch.UpdateUser <>", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateUser <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThan(String value) {
            addCriterion("uplancouponbatch.UpdateUser >", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateUser > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.UpdateUser >=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateUser >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThan(String value) {
            addCriterion("uplancouponbatch.UpdateUser <", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateUser < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualTo(String value) {
            addCriterion("uplancouponbatch.UpdateUser <=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateUser <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLike(String value) {
            addCriterion("uplancouponbatch.UpdateUser like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotLike(String value) {
            addCriterion("uplancouponbatch.UpdateUser not like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIn(List<String> values) {
            addCriterion("uplancouponbatch.UpdateUser in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotIn(List<String> values) {
            addCriterion("uplancouponbatch.UpdateUser not in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.UpdateUser between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotBetween(String value1, String value2) {
            addCriterion("uplancouponbatch.UpdateUser not between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("uplancouponbatch.UpdateTime is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("uplancouponbatch.UpdateTime is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("uplancouponbatch.UpdateTime =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("uplancouponbatch.UpdateTime <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("uplancouponbatch.UpdateTime >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("uplancouponbatch.UpdateTime >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("uplancouponbatch.UpdateTime <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("uplancouponbatch.UpdateTime <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualToColumn(UPlanCouponBatch.Column column) {
            addCriterion(new StringBuilder("uplancouponbatch.UpdateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("uplancouponbatch.UpdateTime in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("uplancouponbatch.UpdateTime not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("uplancouponbatch.UpdateTime between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("uplancouponbatch.UpdateTime not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        private UPlanCouponBatchExample example;

        protected Criteria(UPlanCouponBatchExample example) {
            super();
            this.example = example;
        }

        public UPlanCouponBatchExample example() {
            return this.example;
        }

        @Deprecated
        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
            if (ifAdd) {
                add.add(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then) {
            if (condition) {
                then.criteria(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
            if (condition) {
                then.criteria(this);
            } else {
                otherwise.criteria(this);
            }
            return this;
        }

        public Criteria andLogicalDeleted(boolean deleted) {
            return deleted ? andDeletedEqualTo(UPlanCouponBatch.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(UPlanCouponBatch.Deleted.IS_DELETED.value());
        }

        @Deprecated
        public interface ICriteriaAdd {
            Criteria add(Criteria add);
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }

    public interface ICriteriaWhen {
        void criteria(Criteria criteria);
    }

    public interface IExampleWhen {
        void example(com.ecoolex.discount.sales.entity.UPlanCouponBatchExample example);
    }
}